/**
 * @param {string} s
 * @return {string[]}
 */
var findRepeatedDnaSequences = function (s) {
  let map = new Map(), res = []
  for (let i = 0; i <= s.length - 10; i++) {
    map.set(s.substring(i, i + 10), map.get(s.substring(i, i + 10)) + 1 || 1)

  }
  map.entries((k, v) => {
    if (v > 1) res.push(k)
  })

  return res
};